#include<bits/stdc++.h>
using namespace std;
#define N 150

int main(){
	FILE *f1=fopen("E:\\backup\\backup.dat","w"),*f2=fopen("D:\\diary\\history.txt","r+"),*f3=fopen("D:\\diary\\today.txt","r");
	char ch[N];
	while(fgets(ch,sizeof(ch),f2)!=NULL)
		fputs(ch,f1);
	fseek(f2,0,2);
	while(fgets(ch,sizeof(ch),f3)!=NULL)
		fputs(ch,f2);
	fputs("\n\n",f2);
	fclose(f1),fclose(f2),fclose(f3);
	return 0;
}
